<?php
class UserTipAction extends FrontendAction
{
	public function __construct()
	{
		parent::__construct();
		$this->layout = 'ajax';
	}
	
	public function execute()
	{
		$this->code 	= 0;
		$user_id 		= intval($this->context->post('uid'));
		if (!$user_id > 0){
			return;
		}
		$this->data['isself'] = 0;
		$this->data['isfollow'] = 0;
		if ($user_id == $this->data['user']['id']){
			$this->data['isself'] = 1;
			$this->data['tipuser'] = $this->data['user'];
		}else{
			$followService	= new FollowService();
			$tmp	= $followService->IsFollow($this->data['user']['id'], $user_id);
			if ($tmp){
				$this->data['isfollow'] = 1;
			}
			$userService	= new UserService();
			$this->data['tipuser'] = $userService->get($user_id);
		}
		
		
	}
}

